<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="org.atf.utils.*,org.atf.model.entity.User" %>
<%
	User user = null;
	try {				
		user = (User)session.getAttribute("ATFUser");	
	}catch (Exception e){
		response.sendRedirect("login.jsp");
	}
	if( user == null){
			response.sendRedirect("login.jsp");
	}

%>
<html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <meta http-equiv="X-UA-Compatible" content="IE=edge">  
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <!-- Core CSS - Include with every page -->
 <link href="css/bootstrap.css" rel="stylesheet">
 <link href="font-awesome/css/font-awesome.css" rel="stylesheet">

 <!-- SB Admin CSS - Include with every page -->
<link href="css/site.css" rel="stylesheet">
    
 <!-- Page-Level Plugin CSS - Tables -->
<link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
<link href="css/plugins/datetimepicker/bootstrap-datetimepicker.css" rel="stylesheet">
<link href="css/plugins/datepicker/datepicker.css" rel="stylesheet">
<link href="css/plugins/morris/morris-0.4.3.min.css" rel="stylesheet">
 
  <!-- Core Scripts - Include with every page -->
  <script src="js/jquery-1.10.2.js"></script>
  <script src="js/bootstrap.js"></script>
  
  
	<script type='text/javascript' src='dwr/engine.js'></script>
	<script type='text/javascript' src='dwr/interface/profileController.js'></script>
	<script type='text/javascript' src='dwr/interface/serverController.js'></script>
	<script type='text/javascript' src='dwr/interface/preferenceController.js'></script>
	 <script type='text/javascript' src='dwr/interface/dashboardController.js'></script>
	<script type='text/javascript' src='dwr/interface/serverTaskStatusUpdater.js'></script>
	<script type='text/javascript' src='dwr/interface/notificationUpdater.js'></script>
	<script type='text/javascript' src='dwr/interface/taskManager.js'></script>
	<script type='text/javascript' src='dwr/interface/schedulerManager.js'></script>
	<script type='text/javascript' src='dwr/interface/apacheDashboardController.js'></script>
	<script type='text/javascript' src='dwr/interface/dpDashboardController.js'></script>
	<script type='text/javascript' src='dwr/interface/dpController.js'></script>
	<script type='text/javascript' src='dwr/interface/schedulerController.js'></script>
	
	
	
	
	<script type='text/javascript' src='dwr/util.js'></script>
	<script src="js/site.js"></script>
	<script src="js/alert.js"></script>

<title>Admin ToolKit Facility </title>
</head>
<body onLoad="uft.init();uft.updateMainContainer('jsp/dashboard.jsp')">
  
	<div id="wrapper">
    	 <nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="margin-bottom: 0">
    	 	<div class="navbar-header">
    	 		<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
    	 			<span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
    	 			
    	 		</button>
    	 		<a class="navbar-brand" href="index.html">ATF</a>
       	 	</div> <!-- /.navBar header -->
       	 	<div class="navbar-collapse collapse">
       	 	<ul class="nav navbar-nav">
	            <li class="active" id="nav_top_dashboard"><a data-target="#" data-toggle="pill" href="#" onClick="uft.updateMainContainer('jsp/dashboard.jsp');" > <i class="fa fa-dashboard fa-fw"></i>DashBoard</a></li>
	            <li id="nav_top_server"><a data-target="#" data-toggle="pill" href="#" onClick="uft.updateMainContainer('jsp/server.jsp');" > <i class="fa fa-hdd-o fa-fw"></i>Servers</a></li>
	           <% if(user.getAdmin().equalsIgnoreCase("true")) { %>
	            <li class="dropdown">
	              <a href="#" class="dropdown-toggle" data-toggle="dropdown" ><i class="fa fa-cog fa-fw"></i>Administration <span class="caret"></span></a>
	              <ul class="dropdown-menu" role="menu">
	                <li><a data-target="#" data-toggle="pill" href="#" onClick="uft.updateMainContainer('jsp/profile.jsp');"><i class="fa fa-bars fa-fw"></i>Profile</a></li>
	                <li><a data-target="#" data-toggle="pill" href="#" onClick="uft.updateMainContainer('jsp/preferences.jsp');" ><i class="fa fa-cog fa-fw"></i>Preferences</a></li>
	                <li><a data-target="#" data-toggle="pill" href="#" onClick="uft.updateMainContainer('jsp/audit.jsp');"><i class="fa fa-eye fa-fw"></i>Audit</a></li>
	                <li><a data-target="#" data-toggle="pill" href="#" onClick="uft.updateMainContainer('jsp/adminUtils.jsp');"><i class="fa fa-cogs fa-fw"></i>Admin Utils</a></li>
	                <li><a data-target="#" data-toggle="pill" href="#" onClick="uft.updateMainContainer('jsp/userDetails.jsp');"><i class="fa fa-users fa-fw"></i>Manage Users</a></li>
	                <li><a data-target="#" data-toggle="pill" href="#" onClick="uft.updateMainContainer('jsp/schedulers.jsp');"><i class="fa fa-life-ring fa-fw"></i>Scheduler</a></li>
	               <!--  <li class="divider"></li>  -->
	              </ul>
	            </li>
	             <li class="dropdown">
	              <a href="#" class="dropdown-toggle" data-toggle="dropdown" ><i class="fa fa-cogs fa-fw"></i>Configuration <span class="caret"></span></a>
	              <ul class="dropdown-menu" role="menu">
	                <li><a data-target="#" data-toggle="pill" href="#" onClick="uft.updateMainContainer('jsp/wasConfiguration.jsp');"><i class="fa fa-cubes fa-fw"></i>WebSphere</a></li>	                
	              </ul>
	            </li>
	             <li class="dropdown">
	              <a href="#" class="dropdown-toggle" data-toggle="dropdown" ><i class="fa fa-rocket fa-fw"></i>Testing <span class="caret"></span></a>
	              <ul class="dropdown-menu" role="menu">
	                <li><a data-target="#" data-toggle="pill" href="#" onClick="uft.updateMainContainer('jsp/DPTesting.jsp');"><i class="fa fa-futbol-o fa-fw"></i>Datapower</a></li>	                
	              </ul>
	            </li>
	            <% } %>
         	</ul>
       	 	<ul class="nav navbar-top-links navbar-right">
       	 		<% if(user.getAdmin().equalsIgnoreCase("true")) { %>
       	 		 <li data-toggle="tooltip"  data-animation="true" title="Number of Scheduler Jobs">
       	 		 	<i class="fa fa-truck"></i> <sup class="badge" id="scheduleTaskCount">0</sup>
       	 		 </li>
       	 		<% } %>
       	 		 <li data-toggle="tooltip"  data-animation="true" title="Number of Tasks">
       	 		 	<i class="fa fa-tasks"></i> <sup class="badge" id="tasksIconCount">0</sup>
       	 		 </li>
       	 		 <li class="dropdown">
       	 		 	<a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-bell fa-fw"></i> <sup class="badge" id="notificationIconCount">0</sup> <i class="fa fa-caret-down"></i>
                    </a>
                    
       	 		 	 <ul class="dropdown-menu dropdown-alerts" id="notificationItemEntry">
       	 		 	 	<li style="margin-left: 15px;"><h4>Notifications</h4></li>
       	 		 	 	<li class="divider"></li>
       	 		 	 </ul>
       	 		 </li>
       	 		 <li class="dropdown">
       	 		  <a href="#" class="dropdown-toggle" data-toggle="dropdown" ><i class="fa fa-user"></i> <%=user.getUsername() %> <span class="caret"></span></a>
	              <ul class="dropdown-menu" role="menu">
	                <li><a href="logout.jsp" ><i class="glyphicon glyphicon-off fa-fw"></i>Logout</a></li>
	              </ul>
       	 		 </li>
       	 		 
       	 	</ul> <!-- /.navbar-top-links -->
       	 	</div>
       	 	
		 </nav> 
		 <div id="page-wrapper">
		 	 <div  class="col-lg-12" id="mainContainer" >
			 </div>
		 </div>
		
    </div>  <!-- /#wrapper -->
    <div id="index-alert-container"></div>
 	<div class="modal fade" id="dialogWait" data-backdrop="static" data-keyboard="false" role="dialog" aria-labelledby="basicModal" aria-hidden="true">
	    <div class="modal-dialog">
	        <div class="modal-content">
	            <div class="modal-header">
	          	   	 Processing...
	             </div>
	            <div class="modal-body">
	                
	                	<img src="images/running-loader.gif" width="100%" height="10px"/>
	               		<div class="text-primary text-center modal-message "></div>
	         
	            </div>
	    	</div>
  		</div>
	</div>
  

<!-- Page-Level Plugin Scripts - Tables -->
<script src="js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="js/plugins/dataTables/dataTables.bootstrap.js"></script> 
<script src="js/plugins/moment.js"></script> 
<script src="js/plugins/datetimepicker/bootstrap-datetimepicker.min.js"></script> 
<script src="js/plugins/datepicker/bootstrap-datepicker.js"></script> 
<script src="js/plugins/morris/raphael-2.1.0.min.js"></script> 
<script src="js/plugins/morris/morris.js"></script> 
<script src="js/plugins/visible/jquery.visible.js"></script> 
<script src="js/plugins/flot/jquery.flot.js"></script> 
<script src="js/plugins/flot/jquery.flot.time.js"></script> 
<script src="js/plugins/morris/justgage.1.0.1.js"></script>


<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/plugins/flot/excanvas.min.js"></script><![endif]-->
</body>
</html>